package pl.nazaweb.jboot.afk;

import java.awt.AWTException;
import java.awt.Robot;

/**
 *
 * @author Marek Kawczyński
 */
public class ManaEaterCallback implements ICallback {

    public int hotKey;
    private Robot robot;

    public ManaEaterCallback(int hotKey) throws AWTException {
        this.hotKey = hotKey;
        robot = new Robot();
    }

    @Override
    public void execute() {
        robot.keyPress(hotKey);
        robot.keyRelease(hotKey);
    }
}
